/*
 * This is java.util.Random following Randomizer interface
 */
package org.yagnus.stats.samplers;

/**
 * 
 * @author hc.busy
 */
public final class JavaUtilRandom extends RandomNumberGeneratorShuffle {

	final java.util.Random rng = new java.util.Random();

	public JavaUtilRandom(long seed) {
		super();
		rng.setSeed(seed);
	}

	public JavaUtilRandom() {
		super();
	}

	public final synchronized void setSeed(final long seed) {
		rng.setSeed(seed);
	}

	public final long nextLong() {
		return rng.nextLong();
	}

	public final int nextInt(int n) {
		return rng.nextInt(n);
	}

	public final int nextInt() {
		return rng.nextInt();
	}

	public final synchronized double nextGaussian() {
		return rng.nextGaussian();
	}

	public final float nextFloat() {
		return rng.nextFloat();
	}

	public final double nextDouble() {
		return rng.nextDouble();
	}

	public final void nextBytes(final byte[] bytes) {
		rng.nextBytes(bytes);
	}

	public final boolean nextBoolean() {
		return rng.nextBoolean();
	}
}
